package com.zealfi.wk.feign.service.fallback;

import com.zealfi.wk.api.pojo.User;
import com.zealfi.wk.feign.service.FeignHelloService;
import org.springframework.stereotype.Component;

/**
 * Created by kuan at 2018-04-25 下午 4:08
 */
@Component
public class HelloServiceFallback implements FeignHelloService {
    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello(String name) {
        return "error " + name;
    }

    @Override
    public User hello(String name, Integer age) {
        return new User("未知", 0);
    }

    @Override
    public String hello(User user) {
        return "error " + user.getName() + ", " + user.getAge();
    }
}
